﻿''' <summary>
''' 
''' </summary>
''' <remarks></remarks>
Public NotInheritable Class Utilitaires

#Region "Manipulation des codes couleur"

    ''' <summary>
    ''' 
    ''' </summary>
    ''' <param name="rouge"></param>
    ''' <param name="vert"></param>
    ''' <param name="bleu"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Shared Function RVBtoVBhexa(ByVal rouge As Byte, ByVal vert As Byte, ByVal bleu As Byte) As String
        Dim result As String = "&H"
        result = IIf(Len(Hex(bleu)) = 1, result & "0" & Hex(bleu), result & Hex(bleu))
        result = IIf(Len(Hex(vert)) = 1, result & "0" & Hex(vert), result & Hex(vert))
        result = IIf(Len(Hex(rouge)) = 1, result & "0" & Hex(rouge), result & Hex(rouge))
        Return result
    End Function
#End Region
End Class



